package com.zhao.service.impl;

import com.zhao.dao.PositionDao;
import com.zhao.dao.UserDao;
import com.zhao.entity.Position;
import com.zhao.entity.User;
import com.zhao.service.PositionService;
import com.zhao.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class PositionServiceImpl implements PositionService {

    @Autowired
    private PositionDao positionDao;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Position> findAll() {
        return positionDao.findAll();
    }

    @Override
    public void updatePositionName(String id, String name) {
        positionDao.updatePositionName(id, name);
    }

}
